package com.dhecp.project.api.mapper;

import com.dhecp.core.genericDao.GenericDao;
import com.dhecp.project.api.domain.AmazonShopProduct;
import com.dhecp.project.api.domain.AmazonShopProductReport;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ClassName AmazonShopProductMapper
 * @Description TODO
 * @Author alula
 * @Date 2022-09-28 16:51
 */
public interface AmazonShopProductMapper  extends GenericDao<AmazonShopProduct, String> {

    List<AmazonShopProduct> findAmazonShopProductList(Map<String, Object> params);

    AmazonShopProduct findAmazonShopProductByGuid(@Param("guid") String guid);

    AmazonShopProduct findAmazonShopProductBySkuAndAsin(Map<String, Object> params);

    /**
     * 根据sellerSku与与时间查询单条商品报表信息
     * @param params
     * @return
     */
    AmazonShopProductReport findAmazonShopProductReportByMap(Map<String, Object> params);

    /**
     * 根据sellerSku与ASIN两个更新商品表listingPrice字段
     * @param params
     * @return
     */
    int updateAmazonShopProduct(Map<String, Object> params);

    /**
     * 新增商品报表数据
     * @param model
     * @return
     */
    int insertAmazonShopProductReport(AmazonShopProductReport model);

    /**
     * 修改商品报表数据
     * @param model
     * @return
     */
    int updateAmazonShopProductReport(AmazonShopProductReport model);

}
